package day12.hmoework20;

/**
 * 玩家类
 */
public class Role {
    /**
     * 盗贼
     * @param robber
     */
    public void robing(Robber robber){
        robber.rob();
    }

    /**
     * 猎人
     * @param hunter
     */
    public void hunting(Hunter hunter){
        hunter.hunt();
        hunter.attack();
    }

    /**
     * 医生
     * @param doctor
     */
    public void treating(Doctor doctor){
        doctor.treat();
    }

    /**
     * 农民
     * @param farmer
     */
    public void minting(Farmer farmer){
        farmer.attack();
        farmer.mint();
        farmer.treat();
    }

    /**
     * 士兵
     * @param soldier
     */
    public void defending(Soldier soldier){
        soldier.defend();
    }

    public static void main(String[] args) {
        Role role =new Role();
        role.robing(new Robber("盗贼",10));
        role.hunting(new Hunter("猎人",11));
        role.treating(new Doctor("医生",12));
        role.minting(new Farmer("农民",13));
        role.defending(new Soldier("士兵",14));
    }
}
